<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:sistema="http://sistema.com.br/jsf">


	<h1 class="menu"><ui:insert name="titulo" /></h1>

	<rich:toolBar>

		<rich:dropDownMenu>
			<f:facet name="label">
				<h:panelGroup>
					<h:outputText value="Arquivo" />
				</h:panelGroup>
			</f:facet>
			<rich:menuItem submitMode="ajax" value="Sair" action="#{logoutMB.sair}" />
		</rich:dropDownMenu>

		<rich:dropDownMenu rendered="#{menuMB.controleAcesso}">
			<f:facet name="label">
				<h:panelGroup>
					<h:outputText value="Controle de Acesso" />
				</h:panelGroup>
			</f:facet>

			<rich:menuItem submitMode="ajax" value="Grupo de Usuário" action="#" rendered="#{menuMB.controleAcesso_GrupoUsuario}">
				<a4j:support event="onclick" action="#{menuMB.redirecionar}">
					<f:param name="link" value="grupoUsuario"/>
				</a4j:support>
			</rich:menuItem>

			<rich:menuItem submitMode="ajax" value="Usuário" action="#" rendered="#{menuMB.controleAcesso_Usuario}">
				<a4j:support event="onclick" action="#{menuMB.redirecionar}">
					<f:param name="link" value="usuario"/>
				</a4j:support>
			</rich:menuItem>

			<rich:menuItem submitMode="ajax" value="Tela" action="#" rendered="#{menuMB.controleAcesso_Tela}">
				<a4j:support event="onclick" action="#{menuMB.redirecionar}">
					<f:param name="link" value="tela"/>
				</a4j:support>
			</rich:menuItem>

			<rich:menuItem submitMode="ajax" value="Grupo de Usuário Tela" action="#" rendered="#{menuMB.controleAcesso_GrupoUsuarioTela}">
				<a4j:support event="onclick" action="#{menuMB.redirecionar}">
					<f:param name="link" value="grupoUsuarioTela"/>
				</a4j:support>
			</rich:menuItem>

		</rich:dropDownMenu>

		<rich:dropDownMenu rendered="#{menuMB.cadastro}">
			<f:facet name="label">
				<h:panelGroup>
					<h:outputText value="Cadastro" />
				</h:panelGroup>
			</f:facet>

			<rich:menuItem submitMode="ajax" value="Cliente" action="#" rendered="#{menuMB.cadastro_Cliente}">
				<a4j:support event="onclick" action="#{menuMB.redirecionar}">
					<f:param name="link" value="cliente"/>
				</a4j:support>
			</rich:menuItem>

		</rich:dropDownMenu>

	</rich:toolBar>

</ui:composition>